using System;
using System.Web;

namespace Sedna.Core.Security
{
	/// <summary>
	/// injects a principal or whatever else security related info 
	/// is necessary before handling the request and stores 
	/// the principal after fullfilling a request.
	/// </summary>
	public interface IPrincipalInjector
	{

		/// <summary>
		/// installes a principal or whatever security related context information before handling a request
		/// </summary>
		/// <param name="httpContext">current HttpContext</param>
		void BeforeRequest(HttpContext httpContext);

		/// <summary>
		/// stores (if necessary) a principal or whatever security related context information after handling a request
		/// using any relative long persistence mechanism, e.g. HttpSession
		/// </summary>
		/// <param name="httpContext">current HttpContext</param>
		void AfterRequest(HttpContext httpContext);

	}
}
